﻿<%@ Page Language="C#" AutoEventWireup="false"  MasterPageFile="~/App_MasterPages/layout.Master"
    CodeBehind="Cart.aspx.cs" Inherits="eStore.UI.CartPage" %>
<%@ Import Namespace="eStore.Helpers" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
<portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
    <mp:CornerRounderTop ID="ctop1" runat="server" />
    <asp:Panel ID="pnlStoreManager" runat="server" CssClass="art-Post-inner panelwrapper admin estore estorecart">
            <portal:ModuleTitleControlCustom ID="moduleTitle" runat="server" RenderArtisteer="true" UseLowerCaseArtisteerClasses="true"/>
            <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
        <div class="modulecontent">
            <asp:Panel ID="pnlCartItems" runat="server" CssClass="settingrow cart">
            <table class="cartgrid">
                <asp:Repeater ID="rptCartItems" runat="server">
                    <HeaderTemplate>
                        
                            <tr class="header">
                                <th>
                                    <%# Resources.eStoreResources.CartItemsHeading%>
                                </th>
                                <th>
                                    <%# Resources.eStoreResources.CartPriceHeading%>
                                </th>
                                <th>
                                    <%# Resources.eStoreResources.CartQuantityHeading%>
                                </th>
                                <th>&nbsp;</th>
                            </tr>

                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr class="items">
                            <td><%# Eval("Name") %></td>
                            <td class="price"><%# StoreHelper.FormatPrice(Eval("Price").ToString(), currencyCulture) %></td>
                            <td class="quantity"><asp:TextBox ID="txtQuantity" runat="server" Text='<%# Eval("Quantity") %>' Columns="4" MaxLength="5" />
                            <asp:RangeValidator ID="rvQuantity" runat="server" ControlToValidate="txtQuantity" ValidationGroup="cart" MinimumValue="1" MaximumValue="99999" ErrorMessage="*" />
                            </td>
                            <td>
                                <portal:mojoButton ID="btnUpdateQuantity" runat="server" Text='<%# Resources.eStoreResources.UpdateQuantityButton %>' CommandName="updateQuantity" CommandArgument='<%# Eval("ItemGuid") %>' CssClass="cartbutton"  ValidationGroup="cart"/>
                                <portal:mojoButton ID="btnDelete" runat="server" CssClass="cartbutton" CommandArgument='<%# Eval("ItemGuid") %>'
                                    CommandName="delete" Text='<%# Resources.eStoreResources.DeleteCartItemButton %>' CausesValidation="false" />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <tr class="altitems">
                                <td><%# Eval("Name") %></td>
                                <td class="price"><%# StoreHelper.FormatPrice(Eval("Price").ToString(), currencyCulture) %></td>
                                <td class="quantity"><asp:TextBox ID="txtQuantity" runat="server" Text='<%# Eval("Quantity") %>' Columns="4" MaxLength="5" />
                            <asp:RangeValidator ID="rvQuantityAlt" runat="server" ControlToValidate="txtQuantity" ValidationGroup="cart" MinimumValue="1" MaximumValue="99999" ErrorMessage="*" /></td>                                
                                <td>
                                    <portal:mojoButton ID="btnUpdateQuantityAlt" runat="server" Text='<%# Resources.eStoreResources.UpdateQuantityButton %>' CommandName="updateQuantity" CommandArgument='<%# Eval("ItemGuid") %>' CssClass="cartbutton" ValidationGroup="cart"/>
                                    <portal:mojoButton ID="btnDeleteAlt" runat="server" CssClass="cartbutton" CommandArgument='<%# Eval("ItemGuid") %>'
                                        CommandName="delete" Text='<%# Resources.eStoreResources.DeleteCartItemButton %>' CausesValidation="false" />
                                </td>
                            </tr>
                    </AlternatingItemTemplate>
                </asp:Repeater>
                <tr class="footer">
                    <th>
                        <mp:SiteLabel ID="SiteLabel1" runat="server" CssClass="settinglabeltight storelabel"
                            ConfigKey="CartSubTotalLabel" ResourceFile="eStoreResources" />
                    </th>
                    <th class="price">
                        <asp:Literal ID="litSubTotal" runat="server" />
                    </th>
                    <th>
                    </th>
                    <th>
                    </th>
                </tr>
            <asp:Panel ID="pnlDiscountAmount" runat="server" CssClass="settingrowtight carttotalwrapper storerow">
                <tr class="footer">
                    <th>
                <mp:SiteLabel ID="SiteLabel2" runat="server" CssClass="settinglabeltight storelabel" ConfigKey="CartDiscountTotalLabel"
                    ResourceFile="eStoreResources" />
                    </th>
                    <th class="price">
                <asp:Literal ID="litDiscount" runat="server" />
                    </th>
                    <th>
                    </th>
                    <th>
                    </th>
                </tr>
            </asp:Panel>
            <asp:Panel ID="pnlTotal" runat="server" CssClass="settingrowtight carttotalwrapper storerow">
                <tr class="footer">
                    <th>
                <mp:SiteLabel ID="SiteLabel3" runat="server" CssClass="settinglabeltight storelabel" ConfigKey="CartTotalLabel"
                    ResourceFile="eStoreResources" />
                    </th>
                    <th class="price">
                <asp:Literal ID="litTotal" runat="server" />
                    </th>
                    <th>
                    </th>
                    <th>
                    </th>
                </tr>
            </asp:Panel>
                </table>
            </asp:Panel>
            
            
           
            <asp:Panel ID="pnlDiscountCode" runat="server" CssClass="settingrow">   
                <mp:SiteLabel ID="SiteLabel4" runat="server" CssClass="storelabel" ConfigKey="CartDiscountCodeLabel" ResourceFile="eStoreResources" />
                <asp:TextBox ID="txtDiscountCode" runat="server" />
                <portal:mojoButton ID="btnApplyDiscount" runat="server"  />
                <asp:Label ID="lblDiscountError" runat="server" CssClass="txterror" />        
             </asp:Panel>
            
            <div class="settingrow button">
                &nbsp;<portal:mojoButton ID="btnKeepShopping" runat="server" CssClass="keepshopping" CausesValidation="false" />
                &nbsp;<portal:mojoButton ID="btnOrder" runat="server" CssClass="checkoutlink" ValidationGroup="cart" />
                &nbsp;<asp:HyperLink ID="lnkCheckout" runat="server" CssClass="checkoutlink" ValidationGroup="cart" />
            </div>
            <div class="settingrow or">
                <asp:Literal ID="litOr" runat="server" Visible="false" />
            </div>
            <div class="settingrow">
                <asp:ImageButton ID="btnPayPal" runat="server" ImageUrl="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"
                    AlternateText="Checkout with PayPal" Visible="false" />
                    <portal:mojoGCheckoutButton ID="btnGoogleCheckout" runat="server" Visible="false" /><br />
                    <asp:Label ID="lblMessage" runat="server" CssClass="txterror"></asp:Label>
                <asp:Literal ID="litPayPalFormVariables" runat="server" />
            </div>
            <div class="settingrow">
            <asp:Label ID="lblGoogleMessage" runat="server" CssClass="txterror" Visible="false"></asp:Label> 
            </div>
            <portal:CommerceTestModeWarning ID="commerceWarning" runat="server" />
            <div class="clearpanel">
                <portal:PaymentAcceptanceMark ID="pam1" runat="server" />
            </div>
            
        </div>
        </portal:mojoPanel>
        <div class="cleared"></div>
    </asp:Panel>
    <mp:CornerRounderBottom ID="cbottom1" runat="server" />
    </portal:mojoPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
